﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoolCode.Caching
{
   public  class CacheKeyBuilder
    {
       public static string Join(params string[] keys)
       {
          return   keys.Aggregate((a, b) => (a??"[Null]") + "_" + (b??"[Null]"));
       }

       public static string Join(params object [] keys)
       {
           return keys.Aggregate((a, b) => ((a==null?"[Null]":a) + "_" + (b==null?"[Null]":b))).ToString()  ;
       }
    }
}
